<div class="sub-page-wrapper">
    <div class="layout-sub-page">
        <div class="table-action">
            <div class="left-operate">
                <nz-space [nzSize]='8'>
                    <input
                        *nzSpaceItem
                        [style]='{width: "180px"}'
                        nz-input
                        placeholder="字典名称"
                        [(ngModel)]='searchObj.dictName'
                        (keyup)='keyEnter($event)'
                    />
                    <input
                        *nzSpaceItem
                        [style]='{width: "180px"}'
                        nz-input
                        placeholder="字典类型"
                        [(ngModel)]='searchObj.dictType'
                        (keyup)='keyEnter($event)'
                    />
                    <app-dict-select  *nzSpaceItem [dictKey]='"sys_normal_disable"' [dictPlaceholder]='"字典状态"' [(selectKey)]='searchObj.status'>
                    </app-dict-select>

                    <nz-range-picker nzAllowClear [(ngModel)]='datePick' *nzSpaceItem [nzFormat]="'yyyy-MM-dd'" (ngModelChange)='onDatePick()'></nz-range-picker>

                    <button
                        *nzSpaceItem
                        nz-button
                        nz-tooltip
                        [nzTooltipTitle]="'搜索'"
                        [nzTooltipPlacement]="'top'"
                        (click)='tableComponent.list()'
                    >
                        <i nz-icon nzType="search"></i>
                    </button>
                    <button
                        *nzSpaceItem
                        nz-button
                        nz-tooltip
                        [nzTooltipTitle]="'重置'"
                        [nzTooltipPlacement]="'top'"
                        (click)='resetSearchObject()'
                    >
                        <span nz-icon >重置</span>
                    </button>
                </nz-space>
            </div>
            <div class="right-operate">
                <button
                    nz-button
                    nz-tooltip
                    [nzTooltipTitle]=""
                    [nzTooltipPlacement]="'top'"
                    (click)="dictTypeOptionComponent.onModalOpen('')"
                >
                    <i nz-icon nzType="plus"></i>
                    新增
                </button>
            </div>
        </div>
        <ng-template #loadingTpl>
            <div class="data-loading">
                <ng-lottie
                    [options]="_config.lottieConfig"
                    [width]="_config.lottieConfig.width"
                    [height]="_config.lottieConfig.height"
                >
                </ng-lottie>
            </div>
        </ng-template>
        <app-main-table
            #tableComponent
            [tableKey]='"dictId"'
            [cateId]='"dictType"'
            [subTableKey] = '"dictCode"'
            [tableColumnArray]='dictTypeColumnArray'
            [subTableColumnArray]='dictDataColumnArray'
            [dataService]='dictTypeService'
            [subDataService]='dictDataService'
            [tableOptionComponent]='dictTypeOptionComponent'
            [subTableOptionComponent]='dictDataOptionComponent'
            [optionModelList]='optionModelList'
            [subOptionModelList]='subOptionModelList'
            [subOtherOptionModelList]='subOtherOptionModelList'
            (optionEvent)='optionEvent($event)'
            (subOptionEvent)='subOptionEvent($event)'
            [searchObj]='searchObj'
        ></app-main-table>
    </div>
</div>


<app-dict-type-option #dictTypeOptionComponent [tableComponent]='tableComponent'></app-dict-type-option>
<app-dict-data-option #dictDataOptionComponent [tableComponent]='tableComponent'></app-dict-data-option>
